<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="PhotoController.*,java.util.*, java.io.*,java.sql.*,java.text.SimpleDateFormat;" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="STYLESHEET" type="text/css" href="/KOMORIUTA/page/page.css">
<link rel="STYLESHEET" type="text/css" href="/KOMORIUTA/css/<%=session.getAttribute("photo") %>.css">
<script src="/KOMORIUTA/photo/PtYoung/PtYoung.js" type="text/JavaScript"></script>
<script src="/KOMORIUTA/photo/PtYoung/jquery.js" type="text/javascript"></script> 
<script>
function doList(page){
	document.bbbFrm.currentPage.value=page;
	document.bbbFrm.submit();
}
</script>
</head>
<%
ArrayList<PYoungCommentBean> datas=(ArrayList<PYoungCommentBean>)request.getAttribute("list");
int id=(Integer)request.getAttribute("id");
String nick=(String)session.getAttribute("Mem_Nick");
%>

<body>
<div style="position:relative;width:600px;height:5px;">
</div>
<div id="c">
<table border=0>
<tr>
<td>
<form action="PhotoYoungAction.do" method="post" name="bbbFrm">
<input type="hidden" name="action" value="pt_young_recom" />
<input type="hidden" name="currentPage" />
</form>
	<div id="c1"></div>
	<%
	for(PYoungCommentBean pYoungCommentBean:datas){
	%>	
	<div id="c2">
		<div style="position:relative;width:550px;height:auto;border:0px solid blue;">
			<table border=0 width="550" height="auto">
			<tr>
				<td width="70" valign="top"><%=pYoungCommentBean.getBc_nick() %></td>
				<td><%=pYoungCommentBean.getBc_contents() %>&nbsp;&nbsp;&nbsp;&nbsp;
					<%=pYoungCommentBean.getBc_date() %>
				</td>
				<td class="c2_1" align="center">
				<%
				String bc_nick=(String)pYoungCommentBean.getBc_nick();
				String nick2=(String)session.getAttribute("Mem_Nick");
				if(bc_nick.equals(nick2)){
				%>
				<input id="xbutton" type="button"  onClick="Com_cancle('<%= pYoungCommentBean.getId() %>','<%= pYoungCommentBean.getBabyplus_id() %>')" />
				<%
				}
				%>
				</td>
			</tr>
			</table>
		</div>
	</div>
	<div id="c3"></div>
	<%
	}
	%>
	 	<form name="c_write" action="/KOMORIUTA/PhotoYoungAction.do" method="post">
	 	<input type="hidden" name="action" value="pt_young_recom_write" />
	 	<input type="hidden" name="id" value="<%=id %>" />
	 	<input type="hidden" id="bc_nick" value="<%=nick %>" />
		<table width="600" height="50" border=0>
			<tr>
				<td width="500"><textarea id="comment" class="bc_contents<%=id %>" cols="60" rows="1" onClick="this.value=''">コメントを付ける</textarea></td>
				<td>
				<input type="button" class="button1"  onClick="Comment_write('<%=id %>')" class="combu" />
				</td>
			</tr>　
		</table>
		</form>
</td>
</tr>
</table>
</div>
</body>
</html>